<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>热词排名</title>
    <link rel="stylesheet"  href="../static/layui/css/layui.css" >
</head>
<body>
<table class="layui-hide"  id="demo" lay-filter="test"></table>
</body>

<script type="text/html" id="xuhao">
    {{d.LAY_TABLE_INDEX+1}}
</script>
<script src="../static/layui/js/jquery.min.js"></script>
<script src="../static/layui/layui.js"></script>
<script>

    layui.use([ 'table'], function(){
        var table = layui.table //表格


        //执行一个 table 实例
        table.render({
            elem: '#demo'
            ,height: 450
            ,url: 'http://localhost:8090/hotword/rank' //数据接口
            ,toolbar: 'false' //开启工具栏，此处显示默认图标，可以自定义模板，详见文档
            ,cols: [[ //表头
                {type: 'checkbox', fixed: 'left'}
                ,{title:'排名',templet: '#xuhao', width:80, fixed: 'left' }
                ,{field: 'hotWord', title: '热词', width:100}
            ]]
        });
    });
</script>
</html>